<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import store from '@/store'
import moment from 'moment/moment'

export default {
  name: 'App',
  created() {
    store.dispatch('user/setLockScreen', localStorage.getItem('lockScreen') !== 'false')

    store.dispatch('user/setLastDateTime', moment.now())
    if (store.getters.lockScreenTime === null) {
      store.dispatch('user/setLockScreenTime', localStorage.getItem('lockScreenTime') ?? 300)
    }
  }
}
</script>
